/*
ID: icerupt1
PROG: friday
LANG: C++11
*/
#include <fstream>
#include <string>

using namespace std;
int tot[7];

int zeller(int c, int y, int m, int d)
{
	int w = (d + int(13*(m + 1)/5) + y + int(y/4) + int(c/4) - 2*c) % 7;
	return (w + 7) % 7;
}

bool is_leap(int y)
{
	return ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0));
}

//Saturday, Sunday, Monday, Tuesday, ..., Friday
int day_of_week(int year, int month, int day)
{
	if (month <= 2) year--;
	int c = year/100;
	int y = year%100;
	int m = month;
	if (m <= 2) m += 12;
	int d = day;
	return zeller(c, y, m, d);
}

int main()
{
	ofstream fout ("friday.out");
	ifstream fin ("friday.in");
	int n;
	fin >> n;
	for (int i = 1900; i < 1900 + n; i++) {
		for (int j = 1; j <= 12; j++)
			tot[day_of_week(i, j, 13)]++;
	}

	fout << tot[0];
	for (int i = 1; i < 7; i++) fout << " " << tot[i];
	fout << endl;
}
